# _*_ coding: utf-8 _*_
# @Time : 2024-01-23 21:46
# @Author : wf
import openpyxl
from openpyxl import Workbook
from openpyxl.styles import Font, Alignment
from openpyxl.worksheet.worksheet import Worksheet

wb = Workbook()
ws: openpyxl.worksheet.worksheet.Worksheet = wb.active
print(type(ws))

ws['a1'] = "我的世界"

font = Font(name='微软雅黑', size=16, color='FF0000', bold=True, )
ws['a1'].font = font

# 设置行 和 列的宽高
# ws.row_dimensions[2].height = 30
# ws.column_dimensions['B'].width = 30

alignment = Alignment(horizontal='left', vertical='bottom', wrap_text=True)
ws['a1'].alignment = alignment

wb.save('test4.xlsx')
